package ch05.aop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    private static ApplicationContext applicationContext ;
    static {
        applicationContext = new ClassPathXmlApplicationContext("ch05/aop/aop.xml") ;
    }


    public static  void test1(){
        UserDao userDao = (UserDao) applicationContext.getBean("userDao") ;
        userDao.saveUser();
    }

    public static void main(String[] args) {
        test1() ;
    }
}
